export const listSelectors = {
    tableRows: '.rt-tr',
    tableBodyRowGroups: '.rt-tbody .rt-tr-group',
    tableBodyRows: '.rt-tbody .rt-tr',
    tableRowCheckbox: '[data-testid="checkbox-table-row-selector"]',
    cveDescription: '[data-testid="cve-description"]',
    metadataDescription: '[data-testid="metadata-description"]',
    statusChips: '[data-testid="label-chip"]',
    cveAddToPolicyButton: 'button:contains("Add to policy")',
};

export const dashboardSelectors = {
    getWidget: (title) => {
        return `[data-testid="widget"]:contains('${title}')`;
    },
};

const sidePanelSelectors = {
    sidePanel: '[data-testid="side-panel"]',
    backButton: '[aria-label="Go to preceding breadcrumb"]',
    entityIcon: '[data-testid="entity-icon"]',
    sidePanelExternalLinkButton: '[aria-label="link"]',
    scanDataMessage: '.pf-v5-c-alert__title:contains("CVE data may be inaccurate")',
};

export const selectors = {
    ...dashboardSelectors,
    ...listSelectors,
    ...sidePanelSelectors,
};
